use crate::{
    entities::za_user::Model,
    payload::user::{UserCreatePayload, UserInfoPayload},
    system::{error::AppError, result::Result},
};
use async_trait::async_trait;

#[async_trait]
pub trait UserFacade {
    fn get_by_token(&self, token: String) -> Result<Option<UserInfoPayload>, AppError>;
    async fn get_by_user_id(&self, user_id: String) -> Result<Option<Model>, AppError>;
    async fn delete_by_user_id(&self, user_id: String) -> Result<Option<Model>, AppError>;
    async fn create(&self, payload: UserCreatePayload) -> Result<Model, AppError>;
    async fn fetch(&self, page: u32, pagesize: u32) -> Result<Vec<Model>, AppError>;
}
